<?php

namespace cn\legendfamily;
require 'vendor/autoload.php'; /*只需这一行,使用composer的autoload自动加载*/

header("Content-Type:application/json;charset=utf-8");
//phpinfo();


$controllerStr = $_GET["c"] . "Controller";
$methodStr = $_GET["m"];

/*##### 废弃: 使用composer自动加载 BEGIN*/
//require_once "cn\legendfamily\controller\IndexController.php";
//require_once "cn\legendfamily\controller\LoginController.php";
/*##### 废弃: 使用composer自动加载 END*/

$classNameWithNamespace = "cn\legendfamily\controller\\" . $controllerStr;
$C = new $classNameWithNamespace();
echo $C->$methodStr();


